﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _027_解释器模式
{
    /// <summary>
    /// 罗马数字
    /// </summary>
    class Number : Expression
    {
        public override void Execute(string content)
        {
            switch (content)
            {
                case "I":
                    Console.Write("1 ");
                    break;
                case "II":
                    Console.Write("2 ");
                    break;
                case "III":
                    Console.Write("3 ");
                    break;
                case "IV":
                    Console.Write("4 ");
                    break;
                case "V":
                    Console.Write("5 ");
                    break;
                case "VI":
                    Console.Write("6 ");
                    break;
                case "VII":
                    Console.Write("7 ");
                    break;
                case "IIX":
                    Console.Write("8 ");
                    break;
                case "IX":
                    Console.Write("9 ");
                    break;
                case "X":
                    Console.Write("10 ");
                    break;
                case "XI":
                    Console.Write("11 ");
                    break;
                case "XII":
                    Console.Write("12 ");
                    break;
                default:
                    break;
            }
        }
    }
}
